﻿using Easy.Domain.Core;
using Easy.Domain.Core.Specification;
using Easy.Domain.Test.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace Easy.Domain.Test.Repository
{
    public class BlogRepository : Repository<Blog>, IBlogRepository
    {
        public BlogRepository(TestUnitOfWork unitOfWork)
            : base(unitOfWork)
        {

        }

        public Blog FindById(Guid id)
        {
            DirectSpecification<Blog> sp = new DirectSpecification<Blog>(b => b.Id == 1);

            return base.Find(id);
        }

        public void AddBlog(Blog blog)
        {
            base.Update(blog, a => new object[] { a.Age, a.Name });
        }




        public Blog FindById(int id)
        {
            throw new NotImplementedException();
        }
    }
}
